export const getNewsDetail = (url, params) => fetch("http://chst.vip/data/news.json")
    .then(body => body.json())
    .then(res => {
        //假如params {id:"101"}
        if (res.status === 200) {
            let data = res.data
            let target = data.find(item => item.id === params.id)
            return target
        }
    })
    .catch(err => {
        throw err
    })